<!DOCTYPE html>
<html>

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>demo</title>
    <link href="https://vjs.zencdn.net/7.0.3/video-js.css" rel="stylesheet">
</head>

<body>
<video id="myVideo" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto" width="1080"
       height="708" data-setup='{}'>
 <!--   <source id="source"
            src="http://192.168.128.140:8080/live/livestream.m3u8" type="application/x-mpegURL">-->
    <--<source id="source"
               src="https://szpaasalihlsgw.lechange.cn:443/LCO/5C07AD8PAZ3D28E/19/0/20190929175637/dev_20190929175637_9h67l95pbehfm2cf.m3u8"  type="application/x-mpegURL">
</video>
<!--<video id="myVideos" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto" width="1080"
       height="708" data-setup='{}'>
    <source src="https://vjs.zencdn.net/v/oceans.mp4" type='video/mp4'/>
</video>-->

<div onclick="f123();">点击播放</div>

</body>
<script src="https://vjs.zencdn.net/7.0.3/video.js">


</script>
<script>
    function f123() {
        var conn = new NetConnection();
        var stream = new NetStream(conn);
        var video = new Video();
        this.addChild(video);
        video.attachNetStream(stream);
        conn.connect("rtmp://192.168.128.140:1935/live");
        stream.play("livestream");

    }
</script>
</html>




